
import 'package:flutter/material.dart';

class HeroLogo extends StatelessWidget {
  String assetsLogoName;
  String heroName;

  HeroLogo({this.assetsLogoName, this.heroName}) : assert(assetsLogoName != null);

  @override
  Widget build(BuildContext context) {
    var logo = Image.asset(assetsLogoName, width: 90.0, height: 90.0,);

    return Center(
        child: CircleAvatar(
          backgroundColor: Colors.white,
          radius: 64.0,
          child: heroName == null ? logo : Hero(tag: heroName, child: logo),
        )
    );
  }
}